include (${TOOLS_ROOT}/Definitions.cmake)
include (${TOOLS_ROOT}/PCHSupport.cmake)

set (common_misc_files
	"stdafx.h"
	"stdafx.cpp"
	"targetver.h"
)

function(add_common_properties CurrentTarget)
	
	source_group( misc FILES ${common_misc_files} )
	
	add_compile_definitions(${CurrentTarget})
	
	if(DEFINED ARGV1)
		set(StdAfxLocation "${ARGV1}")
	else()
		set(StdAfxLocation "${CurrentTarget}")
	endif()
	
	add_precompiled_header (${CurrentTarget} "${StdAfxLocation}/stdafx.h" "stdafx.cpp")
	
endfunction(add_common_properties)

function(add_libs_target CurrentTarget)
	set_target_properties( ${CurrentTarget} PROPERTIES FOLDER libs )
endfunction(add_libs_target)

function(add_tests_target CurrentTarget)
	set_target_properties( ${CurrentTarget} PROPERTIES FOLDER tests )
endfunction(add_tests_target)

function(add_prjs_target CurrentTarget)
	set_target_properties( ${CurrentTarget} PROPERTIES FOLDER prjs )
endfunction(add_prjs_target)

function(add_externals_target CurrentTarget)
	set_target_properties( ${CurrentTarget} PROPERTIES FOLDER externals )
endfunction(add_externals_target)